home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
- * TEXTRA AREXX script -- Mike Haas, 1991, All Rights Reserved. *
- * Freely distributable ONLY as a component of the TEXTRA package. *
- * This banner may not be removed or altered (improvements to the *
- * actual program welcome). Please document and send to me. *
- * !!! PLACE THIS FILE IN YOUR REXX: DIRECTORY !!! *
- *******************************************************************/
-
-
- /* DeferStub.textra
- by Nick Didkovsky
-
- This simple AREXX script is useful for assigning stub words to deferred words
- in JForth source code. Assumes you follow a convention where deferred words
- look like:
-
- defer ..theword
-
- and that the temporary stub word for it would be called theword.stub
-
- Pretend this file is an excerpt of your JForth source code. Click one
- or two lines higher than the deferred word declaration above (try line 16) and
- execute this script. Be careful where you click, or you'll be writing JForth
- source code where you don't want it!!!
-
- */
-
-
- options results
-
- FIND "defer"
- if (result == "NOT FOUND") then /* no luck finding the defer */
-
- do
- notify "Can't find any deferred words"
- exit
- end
- HOPTO next word
- HOPSELECT next word
-
- if (rc == 10) then
- do
- notify "HOPSELECT couldn't do the job"
- exit
- end
-
- if (result == "NOT FOUND") then
- /* no luck finding the word's name */
- /* Could happen if 'defer' is the last word in the file, for instance */
- do
- notify "Can't find a name for the word being deferred"
- exit
- end
-
- GET select text
- parse var result numlines ' ' theword
-
- UNSELECT
- DOWN
- NEWLINE
- NEWLINE
- text ": "
- text substr(theword,3,length(theword)-2)
- textn ".stub ( -- )"
- text '." '
- text theword
- text '" executing"'
- text '!" '
- textn '" cr"'
- textn ";"
- NEWLINE
- text "'c "
- text substr(theword,3,length(theword)-2)
- text '.stub is '
- textn theword
-